<% layout('/layouts/default.html', {title: '首页-', libs: ['dataGrid']}){ %>
<!--<!DOCTYPE html>-->
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>首页</title>
    <link rel="stylesheet" href="/../fms/css/main.css">
</head>

<body>
<div class="wrapper">
    <div class="container index">
        <div class="tab_box">
            <a  class="addTabPage" data-href="/fms/a/company/comCompany" ><img src="/../fms/images/ic_kccx.png" alt="">企业管理</a>
            <a class="addTabPage" data-href="/fms/a/store/comStore/list" ><img src="/../fms/images/ic_xjcgd.png" alt="">门店管理</a>
            <a class="addTabPage" data-href="/fms/a/employee/comEmployee/list"><img src="/../fms/images/ic_xjxsd.png" alt="">员工信息</a>

        </div>
        <div class="block_box">
            <div class="block b_1">
                <div class="top">
                    <p>待审核的企业：</p>
                    <span><a  title="待审核" id="waitPassCompany" class="addTabPage" data-href="/fms/a/company/comCompany/list?checkStatus=0"></a>
                     <a title="待审核" id="hint" class="addTabPage" data-href="/fms/a/company/comCompany/list?checkStatus=0" style="font-size: 16px;color: grey"></a>
                    </span>

                </div>

            </div>
            <div class="block b_2">
                <div class="top">
                    <p>许可证已过期：</p>
                    <span></span>
                </div>

            </div>
            <div class="block b_3">
                <div class="top">
                    <p>供应商过期预警：</p>
                    <span></span>
                </div>

            </div>
            <div class="block b_4">
                <div class="top">
                    <p>健康证已过期：</p>
                    <span></span>
                </div>

            </div>
            <div class="block b_5">
                <div class="top">
                    <p>台账预警</p>
                    <span></span>
                </div>

            </div>
            <div class="block b_6">
                <div class="top">
                    <p>视频分析预警</p>
                    <span></span>
                </div>

            </div>
        </div>
    </div>
</div>
<% } %>
<script type="text/javascript" src="/../fms/js/jquery-2.1.4.min.js"></script>
<script>
    fontSize();
    window.onresize = function () {
        fontSize();
    }

    function fontSize() {
        var deviceWidth = document.documentElement.clientWidth || document.body.clientWidth;
        if (deviceWidth >= 1920) deviceWidth = 1920;
        if (deviceWidth <= 1000) deviceWidth = 1000;
        document.documentElement.style.fontSize = deviceWidth / 19.2 + 'px';
    }

    window.onload = function () {
        $.ajax({
            type: "POST",
            url: "/fms/a/school/school/getIndexData",
            dataType: "json",
            success: function (data) {
                var response = JSON.stringify(data)
                if (data.data.waitPassCompanyCount > 0) {
                    document.getElementById("hint").innerHTML = "(点击查看)"
                }
                document.getElementById("waitPassCompany").innerHTML = data.data.waitPassCompanyCount + " 家";
            }
        });
    }
</script>
</body>

</html>